package cinema.model;

import cinema.CinemaShowTime;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.Scanner;
//经理
public class Manager extends User {
    public Manager(String userName, String passWord) {
        super(userName, passWord);
    }
    public void addshowTime(CinemaShowTime.Cinema cinema,String theater,LocalDateTime time) {
    }

    public void inputAndAddShowTime(Scanner scanner) {
        System.out.print("请输入电影名称：");
        String movieName = scanner.nextLine();
        System.out.print("请输入电影时长（分钟）：");
        int duration = scanner.nextInt();
        scanner.nextLine();

        System.out.print("请输入影厅名称：");
        String theater = scanner.nextLine();

        System.out.print("请输入放映时间（格式：yyyy-MM-dd HH:mm）：");
        String timeStr = scanner.nextLine();
        LocalDateTime time = LocalDateTime.parse(timeStr, DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm"));

        // 2. 调用核心加场方法
        addshowTime(new CinemaShowTime.Cinema(movieName, duration), theater, time);

    }

    @Override
    public boolean canAdd() {
        return true;
    }

    public boolean canCheck() {
        return true;
    }

    public boolean canModify() {
        return true;
    }

}
